package com.pjedu.springbootmybatis03.service.serviceimp;

import com.pjedu.springbootmybatis03.entity.User;
import com.pjedu.springbootmybatis03.mapper.UserMapper;
import com.pjedu.springbootmybatis03.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author 汪洋
 * @Description
 */
@Service("userService")
public class UserServiceImp implements UserService {
    @Resource
    private UserMapper userMapper;
    @Override
    public List<User> findAll(){
        return userMapper.findAll();
    }

    @Override
    public User findById(Integer id) {
        return userMapper.findById(id);
    }
}
